import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("login_name", ["username"], { unique: true })
@Index("PK__sys_user__3213E83F3BA4CF8E", ["id"], { unique: true })
@Entity("sys_user", { schema: "dbo" })
export class SysUser {
  @Column("nvarchar", { name: "username", nullable: true, length: 64 })
  username: string | null;

  @Column("nvarchar", { name: "nickname", nullable: true, length: 64 })
  nickname: string | null;

  @Column("tinyint", { name: "gender", nullable: true })
  gender: number | null;

  @Column("nvarchar", { name: "password", nullable: true, length: 100 })
  password: string | null;

  @Column("int", { name: "dept_id", nullable: true })
  deptId: number | null;

  @Column("nvarchar", { name: "avatar", nullable: true, length: 255 })
  avatar: string | null;

  @Column("nvarchar", { name: "mobile", nullable: true, length: 20 })
  mobile: string | null;

  @Column("tinyint", { name: "status", nullable: true })
  status: number | null;

  @Column("nvarchar", { name: "email", nullable: true, length: 128 })
  email: string | null;

  @Column("datetime2", { name: "create_time", nullable: true })
  createTime: Date | null;

  @Column("datetime2", { name: "update_time", nullable: true })
  updateTime: Date | null;

  @Column("bigint", { name: "create_by", nullable: true })
  createBy: string | null;

  @Column("bigint", { name: "update_by", nullable: true })
  updateBy: string | null;

  @Column("datetime2", { name: "delete_time", nullable: true })
  deleteTime: Date | null;

  @Column("nvarchar", { name: "create_user", nullable: true, length: 255 })
  createUser: string | null;

  @Column("nvarchar", { name: "update_user", nullable: true, length: 255 })
  updateUser: string | null;

  @PrimaryGeneratedColumn({ type: "bigint", name: "id" })
  id: string;
}
